package com.ali.item.service.impl;

import com.ali.item.entity.ItemInfo;
import com.ali.item.repository.ItemInfoRepository;
import com.ali.item.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName ItemServiceImpl
 * @Description TODO
 * @Author Alistair.Chow
 * @date 2018/12/14 15:38
 * @Version 1.0
 */
@Service
public class ItemServiceImpl implements ItemService {
    @Autowired
    private ItemInfoRepository itemInfoRepository;

    @Override
    public List<ItemInfo> findValidItemAll() {
        return itemInfoRepository.findAllByStatus(true);
    }

    @Override
    public List<ItemInfo> findList(List<Integer> idList) {
        return itemInfoRepository.findAllByIdIn(idList);
    }
}
